import { Delete, Get, Post, Put } from '../utils/http'

/**
 * 我的收货地址
 */
export const getAddressApi = (data = {}) =>
  Get({
    url: 'api/address',
    data
  })

/**
 * 新增收货地址
 */
export const addAddressApi = (data = {}) =>
  Post({
    url: 'api/address',
    data
  })

/**
 * 修改收货地址
 */
export const updateAddressApi = (data = {}) =>
  Put({
    url: 'api/address',
    data
  })

/**
 * 删除收货地址
 */
export const delAddressApi = (data = {}) =>
  Delete({
    url: 'api/address',
    data
  })

/**
 * 获取收货地址详情
 */
export const getAddressDetailApi = (data = {}) =>
  Get({
    url: 'api/address/detail',
    data
  })
